package A13;

import java.util.List;

public class School {
    private String schoolName; // 学院名称
    private List<Department> departments; // 聚合：1~*个系
    private List<Student> students; // 聚合：0~*个学生

    public School(String schoolName, List<Department> departments, List<Student> students) {
        this.schoolName = schoolName;
        this.departments = departments;
        this.students = students;
    }

    // 添加学生
    public void addStudent(Student student) {
        students.add(student);
    }

    // getter/setter
    public String getSchoolName() {
        return schoolName;
    }

    public List<Department> getDepartments() {
        return departments;
    }

    public List<Student> getStudents() {
        return students;
    }
}